# Contributor: Edd Salkield <edd@salkield.uk>
# Maintainer: Edd Salkield <edd@salkield.uk>
pkgname=liquid-dsp
pkgver=1.5.0
pkgrel=0
pkgdesc="Digital signal processing library for software-defined radios"
url="https://liquidsdr.org"
arch="x86_64 aarch64" # tests only pass on 64 bit architectures https://github.com/jgaeddert/liquid-dsp/issues/146
license="MIT"
makedepends="autoconf automake"
subpackages="$pkgname-dev"
source="https://github.com/jgaeddert/liquid-dsp/archive/v$pkgver/liquid-dsp-v$pkgver.tar.gz"

prepare() {
	default_prepare

	./bootstrap.sh
}

build() {
	./configure \
		--prefix=/usr \
		--host=$CHOST \
		--build=$CBUILD
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install

	# https://github.com/jgaeddert/liquid-dsp/issues/312
	mv "$pkgdir"/usr/lib/libliquid.a* "$pkgdir"/usr/lib/libliquid.a
}

sha512sums="
b9b655d155136aee828c76ae8287726b8abf51c969e5c2ded63e99bcb064b247597eec5b896d2fd608d94363a0d3d51214af12673858a5bdf22d27d4b662de12  liquid-dsp-v1.5.0.tar.gz
"
